import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    value:1,
  },
  mutations: {
    ADD_VAlUE(state,item){
      state.value ++;
      state.value = [...item]
    },
    LESS_VALUE(state,item){
      state.value--;
      state.value = [...item]
      if(state.value <= 1){
        state.value = 1;
        return
      }
    }
  },
  actions: {
  },
  modules: {
  }
})
